package com.cxyd.modules.wcs.controller;

import com.cxyd.common.page.PageData;
import com.cxyd.common.utils.Result;
import com.cxyd.modules.wcs.dto.AgvTrkYfDTO;
import com.cxyd.modules.wcs.service.AgvTrkYfService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("wcs/agv-trk-yf")
public class AgvTrkYfController {
    @Resource
    private AgvTrkYfService agvTrkYfService;

    @GetMapping("page")
    @RequiresPermissions("wcs:agv-trk-yf:page")
    public Result<PageData<AgvTrkYfDTO>> page(@RequestParam Map<String, Object> params) {
        PageData<AgvTrkYfDTO> page = agvTrkYfService.page(params);

        return new Result<PageData<AgvTrkYfDTO>>().ok(page);
    }
}
